\hypertarget{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute}{\section{Political\-Classifier.\-Web.\-Validation.\-File\-Attribute Class Reference}
\label{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute}\index{Political\-Classifier.\-Web.\-Validation.\-File\-Attribute@{Political\-Classifier.\-Web.\-Validation.\-File\-Attribute}}
}


Specifies that a data field value is a file.  


Inheritance diagram for Political\-Classifier.\-Web.\-Validation.\-File\-Attribute\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a02956a55ecd3b0ec247049b68107e4b6}{File\-Attribute} ()
\begin{DoxyCompactList}\small\item\em Creates a \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute}{File\-Attribute} with default settings. \end{DoxyCompactList}\item 
\hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a6155ffff1c8b987fbc5308c8aa02a586}{File\-Attribute} (params string\mbox{[}$\,$\mbox{]} extensions)
\begin{DoxyCompactList}\small\item\em Creates a \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute}{File\-Attribute} with a specified list of accepted file extensions. \end{DoxyCompactList}\item 
override bool \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_abecf0cd5f5a67976530814511e8ee376}{Is\-Valid} (object value)
\begin{DoxyCompactList}\small\item\em Tests whether a posted file is valid. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Properties}
\begin{DoxyCompactItemize}
\item 
string\mbox{[}$\,$\mbox{]} \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_ab298762c0b265d04b277761e36d05224}{Extensions}\hspace{0.3cm}{\ttfamily  \mbox{[}get, set\mbox{]}}
\begin{DoxyCompactList}\small\item\em Accepted file extensions. \end{DoxyCompactList}\item 
int \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a278dbc1a8a72c23047cee3f21e5973e6}{Max\-Size}\hspace{0.3cm}{\ttfamily  \mbox{[}get, set\mbox{]}}
\begin{DoxyCompactList}\small\item\em Maximum file size (in bytes). \end{DoxyCompactList}\item 
int \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a974d47fb9165289d0ffb6b395585f8cb}{Min\-Size}\hspace{0.3cm}{\ttfamily  \mbox{[}get, set\mbox{]}}
\begin{DoxyCompactList}\small\item\em Minimum file size (in bytes). \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Specifies that a data field value is a file. 

This attribute is used to mark a field, parameter, or property as a posted file. It then validates that the marked field, parameter, or property contains a file that conforms to the specified set of attributes. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a02956a55ecd3b0ec247049b68107e4b6}{\index{Political\-Classifier\-::\-Web\-::\-Validation\-::\-File\-Attribute@{Political\-Classifier\-::\-Web\-::\-Validation\-::\-File\-Attribute}!File\-Attribute@{File\-Attribute}}
\index{File\-Attribute@{File\-Attribute}!PoliticalClassifier::Web::Validation::FileAttribute@{Political\-Classifier\-::\-Web\-::\-Validation\-::\-File\-Attribute}}
\subsubsection[{File\-Attribute}]{\setlength{\rightskip}{0pt plus 5cm}Political\-Classifier.\-Web.\-Validation.\-File\-Attribute.\-File\-Attribute (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a02956a55ecd3b0ec247049b68107e4b6}


Creates a \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute}{File\-Attribute} with default settings. 

The default constructor will initialize the new \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute}{File\-Attribute} with the following default settings\-: 
\begin{DoxyItemize}
\item Validation\-Attribute.\-Error\-Message Validation\-Attribute.\-Error\-Message is set to \-\_\-default\-Error\-Message.  
\item \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_ab298762c0b265d04b277761e36d05224}{Extensions} \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_ab298762c0b265d04b277761e36d05224}{Extensions} is set to {\ttfamily null}.  
\item \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a974d47fb9165289d0ffb6b395585f8cb}{Min\-Size} \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a974d47fb9165289d0ffb6b395585f8cb}{Min\-Size} is set to {\ttfamily 0}.  
\item \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a278dbc1a8a72c23047cee3f21e5973e6}{Max\-Size} \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a278dbc1a8a72c23047cee3f21e5973e6}{Max\-Size} is set to the configured value of the system.\-web/http\-Runtime/\-Max\-Request\-Length from the web.\-config.  
\end{DoxyItemize}\hypertarget{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a6155ffff1c8b987fbc5308c8aa02a586}{\index{Political\-Classifier\-::\-Web\-::\-Validation\-::\-File\-Attribute@{Political\-Classifier\-::\-Web\-::\-Validation\-::\-File\-Attribute}!File\-Attribute@{File\-Attribute}}
\index{File\-Attribute@{File\-Attribute}!PoliticalClassifier::Web::Validation::FileAttribute@{Political\-Classifier\-::\-Web\-::\-Validation\-::\-File\-Attribute}}
\subsubsection[{File\-Attribute}]{\setlength{\rightskip}{0pt plus 5cm}Political\-Classifier.\-Web.\-Validation.\-File\-Attribute.\-File\-Attribute (
\begin{DoxyParamCaption}
\item[{params string\mbox{[}$\,$\mbox{]}}]{extensions}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a6155ffff1c8b987fbc5308c8aa02a586}


Creates a \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute}{File\-Attribute} with a specified list of accepted file extensions. 


\begin{DoxyParams}{Parameters}
{\em extensions} & The list of valid file extensions.\\
\hline
\end{DoxyParams}


This constructor will initialize the new \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute}{File\-Attribute} with the following default settings\-: 
\begin{DoxyItemize}
\item Validation\-Attribute.\-Error\-Message Validation\-Attribute.\-Error\-Message is set to \-\_\-default\-Error\-Message.  
\item \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_ab298762c0b265d04b277761e36d05224}{Extensions} \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_ab298762c0b265d04b277761e36d05224}{Extensions} is set to {\itshape extensions} .  
\item \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a974d47fb9165289d0ffb6b395585f8cb}{Min\-Size} \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a974d47fb9165289d0ffb6b395585f8cb}{Min\-Size} is set to {\ttfamily 0}.  
\item \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a278dbc1a8a72c23047cee3f21e5973e6}{Max\-Size} \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a278dbc1a8a72c23047cee3f21e5973e6}{Max\-Size} is set to the configured value of the system.\-web/http\-Runtime/\-Max\-Request\-Length from the web.\-config.  
\end{DoxyItemize}

\subsection{Member Function Documentation}
\hypertarget{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_abecf0cd5f5a67976530814511e8ee376}{\index{Political\-Classifier\-::\-Web\-::\-Validation\-::\-File\-Attribute@{Political\-Classifier\-::\-Web\-::\-Validation\-::\-File\-Attribute}!Is\-Valid@{Is\-Valid}}
\index{Is\-Valid@{Is\-Valid}!PoliticalClassifier::Web::Validation::FileAttribute@{Political\-Classifier\-::\-Web\-::\-Validation\-::\-File\-Attribute}}
\subsubsection[{Is\-Valid}]{\setlength{\rightskip}{0pt plus 5cm}override bool Political\-Classifier.\-Web.\-Validation.\-File\-Attribute.\-Is\-Valid (
\begin{DoxyParamCaption}
\item[{object}]{value}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_abecf0cd5f5a67976530814511e8ee376}


Tests whether a posted file is valid. 

Uses the configured settings to validate the posted file. The file must meet the following criteria\-:


\begin{DoxyItemize}
\item {\itshape value}  must not be {\ttfamily null}.  
\item {\itshape value}  must be convertable to Http\-Posted\-File\-Base.  
\item The posted file's content length must be greater than {\ttfamily 0}.  
\item The posted file's content length must be greater than or equal to \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a974d47fb9165289d0ffb6b395585f8cb}{Min\-Size}.  
\item The posted file's content length must be less than or equal to \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a278dbc1a8a72c23047cee3f21e5973e6}{Max\-Size}.  
\item The posted file's extension must be contained within \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_ab298762c0b265d04b277761e36d05224}{Extensions}.  
\end{DoxyItemize}

If the posted file meets all of the above criteria, \hyperlink{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_abecf0cd5f5a67976530814511e8ee376}{Is\-Valid(object)} will return {\ttfamily true}. Otherwise, it will return {\ttfamily false}.


\begin{DoxyParams}{Parameters}
{\em value} & The object to validate.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
True/false indicating whether the tested {\itshape value}  is a valid file.
\end{DoxyReturn}


\subsection{Property Documentation}
\hypertarget{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_ab298762c0b265d04b277761e36d05224}{\index{Political\-Classifier\-::\-Web\-::\-Validation\-::\-File\-Attribute@{Political\-Classifier\-::\-Web\-::\-Validation\-::\-File\-Attribute}!Extensions@{Extensions}}
\index{Extensions@{Extensions}!PoliticalClassifier::Web::Validation::FileAttribute@{Political\-Classifier\-::\-Web\-::\-Validation\-::\-File\-Attribute}}
\subsubsection[{Extensions}]{\setlength{\rightskip}{0pt plus 5cm}string \mbox{[}$\,$\mbox{]} Political\-Classifier.\-Web.\-Validation.\-File\-Attribute.\-Extensions\hspace{0.3cm}{\ttfamily [get]}, {\ttfamily [set]}}}\label{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_ab298762c0b265d04b277761e36d05224}


Accepted file extensions. 

An array of accepted file extensions. If this value is null, all extensions are accepted. \hypertarget{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a278dbc1a8a72c23047cee3f21e5973e6}{\index{Political\-Classifier\-::\-Web\-::\-Validation\-::\-File\-Attribute@{Political\-Classifier\-::\-Web\-::\-Validation\-::\-File\-Attribute}!Max\-Size@{Max\-Size}}
\index{Max\-Size@{Max\-Size}!PoliticalClassifier::Web::Validation::FileAttribute@{Political\-Classifier\-::\-Web\-::\-Validation\-::\-File\-Attribute}}
\subsubsection[{Max\-Size}]{\setlength{\rightskip}{0pt plus 5cm}int Political\-Classifier.\-Web.\-Validation.\-File\-Attribute.\-Max\-Size\hspace{0.3cm}{\ttfamily [get]}, {\ttfamily [set]}}}\label{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a278dbc1a8a72c23047cee3f21e5973e6}


Maximum file size (in bytes). 

The maximum allowed file size (in bytes). \hypertarget{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a974d47fb9165289d0ffb6b395585f8cb}{\index{Political\-Classifier\-::\-Web\-::\-Validation\-::\-File\-Attribute@{Political\-Classifier\-::\-Web\-::\-Validation\-::\-File\-Attribute}!Min\-Size@{Min\-Size}}
\index{Min\-Size@{Min\-Size}!PoliticalClassifier::Web::Validation::FileAttribute@{Political\-Classifier\-::\-Web\-::\-Validation\-::\-File\-Attribute}}
\subsubsection[{Min\-Size}]{\setlength{\rightskip}{0pt plus 5cm}int Political\-Classifier.\-Web.\-Validation.\-File\-Attribute.\-Min\-Size\hspace{0.3cm}{\ttfamily [get]}, {\ttfamily [set]}}}\label{class_political_classifier_1_1_web_1_1_validation_1_1_file_attribute_a974d47fb9165289d0ffb6b395585f8cb}


Minimum file size (in bytes). 

The minumum allowed file size (in bytes). 

The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
C\-:/\-Users/\-Jonathan.\-De\-Carlo/\-Source/\-Repos/\-Political\-Classifier/src/\-Political\-Classifier.\-Web/\-Validation/File\-Attribute.\-cs\end{DoxyCompactItemize}
